//
//  LTableViewCell.m
//  tableview
//
//  Created by mac on 14-9-8.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "LTableViewCell.h"

@implementation LTableViewCell
{
    UIImageView*	m_checkImageView;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
       
        [self creat];
    }
    return self;
}

- (void)creat{
    if (m_checkImageView == nil)
    {
        self.isCheck = NO;
        m_checkImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Unselected.png"]];
        m_checkImageView.frame = CGRectMake(10, 10, 29, 29);
        [self addSubview:m_checkImageView];
        self.nameLable = [[UILabel alloc]initWithFrame:CGRectMake(50, 10, 200, 29)];
        [self addSubview:self.nameLable];
    }
}



- (void)setChecked{
    self.isCheck = !self.isCheck;
    if (self.isCheck == YES)
	{
		m_checkImageView.image = [UIImage imageNamed:@"Selected.png"];

	}
	else
	{
		m_checkImageView.image = [UIImage imageNamed:@"Unselected.png"];
		self.backgroundView.backgroundColor = [UIColor whiteColor];
	}
    
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];


}

@end


